import request from '@/utils/request'

// 查询收货地址列表
export function listStaffAddress(query) {
  return request({
    url: '/person/staffAddress/list',
    method: 'get',
    params: query
  })
}

// 查询收货地址列表 无分页
export function listStaffAddressNoPager(query) {
  return request({
    url: '/person/staffAddress/listNoPager',
    method: 'get',
    params: query
  })
}

// 查询收货地址详细
export function getStaffAddress(id) {
  return request({
    url: '/person/staffAddress/' + id,
    method: 'get'
  })
}

// 新增收货地址
export function addStaffAddress(data) {
  return request({
    url: '/person/staffAddress',
    method: 'post',
    data: data
  })
}

// 修改收货地址
export function updateStaffAddress(data) {
  return request({
    url: '/person/staffAddress',
    method: 'put',
    data: data
  })
}

// 删除收货地址
export function delStaffAddress(id) {
  return request({
    url: '/person/staffAddress/' + id,
    method: 'delete'
  })
}

// 获取收货地址详细信息
export function getDefaultAddress(data) {
  return request({
    url: '/person/staffAddress/getDefaultAddress/',
    method: 'get',
    params: data
  })
}
